<!-- 优惠劵列表  -->
<template>
	<view class="page_box">
		<view class="content_box padding">
			<cu-custom :isBack="true">
				<block slot="backText"></block>
				<block slot="content">我的伙伴</block>
			</cu-custom>
			<view class="head padding flex">
				<image src="" mode="" class="round bg-cyan" style="width:100rpx  ; height: 100rpx;"></image>
				<view class="flex flex-direction justify-around margin-left">
					<text class="text-bold">艾福西西</text>
					<text>艾福西西</text>
				</view>
			</view>
			<view class="radius padding flex justify-between" style="width: 706rpx; height: 160rpx;background-color: #FFFFFF;">
				<view class="flex flex-direction justify-between">
					<text style="color: #746445; font-size: 26rpx;">当前收益（元）</text>
					<text style="color: #52452C; font-size: 44rpx;">5563.3</text>
				</view>
				<view class="flex align-center ">
					<text style="background-color: #B39C72;display: block;color: #FFFFFF; width: 130rpx; height: 50rpx;line-height: 50rpx; " class="round text-center margin-right">
						提现
					</text>
					<!-- <text style="background-color: #B39C72;display: block;color: #FFFFFF; width: 130rpx; height: 50rpx;line-height: 50rpx;  " class="round   text-center">
						明细
					</text> -->
				</view>
			</view>
			<view class="radius padding flex justify-between margin-top align-center" style="width: 706rpx; background-color: #FFFFFF;">
				<text class="text-black">分销团队</text>
				<view class="cu-avatar-group  ">
					
					<view class="cu-avatar round " v-for="(item, index) in teamDate" :key="index"><image :src="$IMG_URL + item.avatar" mode="" v-if="item.avatar"></image></view>
				</view>
			</view>
			<view class="padding">
				<text class="cuIcon-title text-lg">分销订单</text>
				<view v-for="(item, index) in couponList" :key="index" class="padding-tb-sm flex justify-around align-center">
					<image src="../../../static/czz.png" mode="" style="width: 75rpx; height: 75rpx;" class="radius "></image>
					<view class="flex  margin-left align-center">
						<view class="flex flex-direction">
							<text style="color: #232323;font-size: 28rpx;">时间: {{tools.timestamp(item.createtime)}}</text>
							<text style="color: #BABABA;font-size: 24rpx; width: 50vw;" class="text-cut block response">订单号: {{item.order_number}}</text>
						</view>
					</view>
					<text class="text-price text-bold" style="color: #000000;">{{item.dividend_amount}}</text>
				</view>
			</view>
		</view>

		<!-- 自定义底部导航 -->
		<shopro-tabbar></shopro-tabbar>
		<!-- 关注弹窗 -->
		<shopro-float-btn></shopro-float-btn>
		<!-- 连续弹窗提醒 -->
		<shopro-notice-modal></shopro-notice-modal>
		<!-- 登录提示 -->
		<shopro-login-modal></shopro-login-modal>
	</view>
</template>

<script>
export default {
	components: {},
	data() {
		return {
			tools: this.$tools,
			stateCurrent: 1,
			couponList: [],
			teamDate: [],
		};
	},
	computed: {},
	onLoad() {
		this.getCouponList();
		let e = this.$Route.query;
	},
	methods: {
		onNav(id) {
			this.stateCurrent = id;
			this.couponList = [];
			this.getCouponList();
		},
		jump(path, parmas) {
			this.$Router.push({
				path: path,
				query: parmas,
			});
		},
		// 套餐包
		getCouponList() {
			let that = this;
			that.$api('ordrss', {}).then(res => {
				console.log('111 :>> ', res);
				this.couponList = res.data.data
				this.myTeam();
			});
		},

		myTeam() {
			let that = this;
			that.$api('myTeam', {}).then(res => {
				console.log('222 :>> ', res);
				this.teamDate = res.data.data;
			});
		},
	},
};
</script>

<style lang="scss">
.content_box {
	background: linear-gradient(180deg, rgba(239, 196, 128, 1) 0%, rgba(248, 220, 165, 1) 25%, rgba(255, 255, 255, 1) 98%);
}
.page_box {
	background: #fff;
}
</style>
